package com.mt.family.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mt.family.entity.DTO.RegisterDto;
import com.mt.family.entity.DTO.updateDto;
import com.mt.family.entity.Login;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mt.family.entity.Validation;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 胖头鱼
 */
public interface LoginService extends IService<Login> {

    Login login(String loginName, String password);

    Login BaseResultMap( Integer userId, Integer userTypeId);

    boolean updatePassWord(Integer currentUserId, String oldPassword,String newPassword);


    Page<Login> returnLogInfo(Integer pageNum, Integer pageSize, String searchEnable,String searchUserType,String searchLoginNo);

    boolean removeUsers(List<Integer> userIds);


    boolean registerUser(RegisterDto register);

    boolean removeUserById(Integer userId,Integer userTypeId);

    void sendEmail(String email,Integer type);

    Login loginEmail(Validation validation);

    void matchCode(Validation validation);

    boolean updateUserInfo(updateDto updateObj, Integer userTypeById);
}
